package exam.qianxing;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;

public class testb1 {
    public static void main(String[] args) {

        String list = "32,39,45,33,34,35,36,37,38,40,41,42,44,46,47,58,59,63,64,91,92,10,9,93,94,95,96,123,124,125,126,43,60,61,62,215,247,48,49,50,51,52,53,54,55,56,57,97,65,98,66,99,67,100,68,101,69,102,70,103,71,104,72,105,73,106,74,107,75,108,76,109,77,110,78,111,79,112,80,113,81,114,82,115,83,116,84,117,85,118,86,119,87,120,88,121,89,122,90";
        String[] listnum = list.split(",");
        Map<String,Integer> map = new HashMap<>();

        for (int i = 0; i < listnum.length; i++) {
            map.put(listnum[i],i+1);
        }

        String res = "";

        Scanner scanner = new Scanner(System.in);

        while(scanner.hasNext()){
            String in = scanner.next();
            String[] input = in.split(",");

            res = map.get(input[0]).toString();
            for (int i = 1; i < input.length; i++) {
                res = res +","+map.get(input[i]).toString();
            }
            System.out.println(res);
        }

    }
}
